//
//  NEDInputViewController.m
//  NEDViews_Example
//
//  Created by 98du on 2021/12/6.
//  Copyright © 2021 林宁宁. All rights reserved.
//

#import "NEDInputViewController.h"

#import "NEDInputTextField.h"
#import "NEDTextInputNumber.h"
#import "Masonry.h"

#import "NEDInputTextView.h"

@interface NEDInputViewController ()

@end

@implementation NEDInputViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    NEDInputTextField * inputView = [NEDInputTextField new];
    inputView.format = [[NEDTextInputNumber alloc] initWithMaxCount:5];
    inputView.ned_placeholder = @"最多五个";
    [inputView addLeftViewShowWidth:100 title:@"输入限制" withFont:14];
    [self.view addSubview:inputView];
    [inputView setDidChangeBlock:^(NEDInputTextField * _Nonnull passTextField) {
        NSLog(@"%@",passTextField.text);
    }];
    [inputView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self.view);
        make.height.mas_equalTo(60);
    }];
    
    
    NEDInputTextView * textView = [NEDInputTextView new];
    [textView setDidChangeBlock:^(NEDInputTextView * _Nonnull passTextView) {
        NSLog(@"%@",passTextView.text);
    }];
    textView.backgroundColor = [[UIColor grayColor] colorWithAlphaComponent:0.3];
    [textView addLeftViewShowSize:CGSizeMake(50, 50) title:@"备注"];
    [self.view addSubview:textView];
    [textView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.top.equalTo(inputView.mas_bottom).offset(10);
        make.height.mas_equalTo(100);
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
